import axios from '@/axios'
// 查询项目详情
export function getProjectInfo(projectId) {
  return axios({
    url: `/task/tcTaskProject/${projectId}`,
    method: 'get',
  })
}

// 保存项目信息
export function saveProjectInfo(data) {
  return axios({
    url: '/task/tcTaskProject',
    method: 'put',
    data,
  })
}
// 保存阶段信息
export function addProjectTaskItem(data) {
  return axios({
    url: '/task/tcTaskItems',
    method: 'post',
    data,
  })
}
export function editProjectTaskItem(data) {
  return axios({
    url: '/task/tcTaskItems',
    method: 'put',
    data,
  })
}
export function deleteProjectTaskItem(itemId) {
  return axios({
    url: `/task/tcTaskItems/${itemId}`,
    method: 'delete',
  })
}

// 归档
export function tcTaskProjectFiled(id) {
  return axios({
    url: `/task/tcTaskProject/filed/${id}`,
    method: 'get',
  })
}
